package com.xiyu.service.vo.unit.worker.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.*;

import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 单位职工 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class UnitWorkerBase {

    @Schema(description = "姓名")
    @Size(max = 50, message = "姓名长度不能超过50")
    private String name;

    @Schema(description = "身份证号")
    @Size(max = 50, message = "身份证号长度不能超过50")
    private String identityCard;

    @Schema(description = "性别")
    @Range(max = 127, message = "性别最大不能超过127")
    private Integer sex;

    @Schema(description = "办公电话")
    @Size(max = 50, message = "办公电话长度不能超过50")
    private String officeTelephone;

    @Schema(description = "手机号")
    @Size(max = 50, message = "手机号长度不能超过50")
    private String mobile;

    @Schema(description = "职务")
    @Size(max = 50, message = "职务长度不能超过50")
    private String duties;

    @Schema(description = "职级")
    @Range(max = 127, message = "职级最大不能超过127")
    private Long rankId;

    @Schema(description = "办公室ID")
    private Long spaceId;

    @Schema(description = "单位ID")
    private Long unitId;

}
